package com.ixuestar.controller;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ixuestar.entity.YxClassschedule;
import com.ixuestar.service.IxuestarCloudELService;
import com.ixuestar.util.ReturnResult;

import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

@CrossOrigin
@ResponseBody
@RestController
@RequestMapping(value = "/cloudel")
public class IxuestarCloudELController extends BaseController{

	
	@Autowired
	private IxuestarCloudELService ixuestarCloudELService;
	
	public Logger logger = Logger.getLogger(IxuestarCloudELController.class);
	
	/**
	 * @method 通过手机号获取老师信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getWxSessionKey")
	@ApiOperation(value = "获取教师端小程序登录的sessionKey",httpMethod = "POST")
	public Map<String, Object> getWxSessionKey(@RequestBody @ApiParam(required = true,value = "请求生成的code")JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		try {
			logger.info("-----------进入getWxSessionKey接口-------------");
			String code = jsonObject.getString("code");
			//执行接口
			JSONObject wxSessionKey = ixuestarCloudELService.getWxSessionKey(code);
			Integer ccode = wxSessionKey.getInteger("code");
			//
			wxSessionKey.remove("code");
			if (ccode==0) {
				map = ReturnResult.correctResult(wxSessionKey);				
			}else if (ccode==1) {
				map = ReturnResult.otherJSONObjectResult(ccode, wxSessionKey, "首次登陆");
			}else if (ccode==2) {
				map = ReturnResult.otherJSONObjectResult(ccode, wxSessionKey, "登陆未绑定");
			}
			logger.info("-------wxSessionKey---"+wxSessionKey+"--------------");
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			map = ReturnResult.wrongResult();
		}
		return map;
	}
	

	/**
	 * @method 通过手机号信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getWxuserInfo")
	public Map<String, Object> getWxTelephone(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getWxTelephone接口-------------");
		//请求接口
		JSONObject wxuserInfo = ixuestarCloudELService.getWxuserInfo(jsonObject);
		Integer code = wxuserInfo.getInteger("code");
		if (code!=-1) {
			if (code==0) {
				map = ReturnResult.correctResult(wxuserInfo);
			}else if(code==1) {
				map = ReturnResult.otherJSONObjectResult(0, wxuserInfo, "请老师绑定所属年级以及所教班级");
			}else if (code==2) {
				map = ReturnResult.otherJSONObjectResult(0, wxuserInfo, "用户第一次登录，请绑定所属年级以及所教班级");
			}
		}else {
			map = ReturnResult.wrongResult();
		}
		return map;
	}
	
	/**
	 * @method 获取学校列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getSchoolList")
	public Map<String, Object> getSchoolList(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getSchoolList接口-------------");
		
		//请求接口
		JSONObject schoolInfos = ixuestarCloudELService.getSchoolInfos(jsonObject);
		if (!schoolInfos.isEmpty()) {
			map = ReturnResult.correctResult(schoolInfos);
		}else {
			map = ReturnResult.otherResult(1, "未获取到该类型的学校列表");
		}
		return map;
	}
	
	/**
	 * @method 获取年级列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getSchoolGradeList")
	public Map<String, Object> getSchoolGradeList(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getSchoolGradeList接口-------------");
		//请求接口
		JSONObject schoolGradeList = ixuestarCloudELService.getSchoolGradeList(jsonObject);
		if (!schoolGradeList.isEmpty()) {
			map = ReturnResult.correctResult(schoolGradeList);
		}else {
			map = ReturnResult.otherResult(1, "未获取到该学校的年级列表");
		}
		return map;
	}
	
	/**
	 * @method 获取班级列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getSchoolClassList")
	public Map<String, Object> getSchoolClassList(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getSchoolClassList接口-------------");
		//请求接口
		JSONObject schoolClassList = ixuestarCloudELService.getSchoolClassList(jsonObject);
		if (!schoolClassList.isEmpty()) {
			map = ReturnResult.correctResult(schoolClassList);
		}else {
			map = ReturnResult.otherResult(1, "未获取到该年级的班级列表");
		}
		return map;
	}
	
	/**
	 * @method 通过科目获取老师
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getTeacherBySubject")
	public Map<String, Object> getTeacherBySubject(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		//执行
		JSONObject schoolTeacher = ixuestarCloudELService.getSchoolTeacherList(jsonObject);
		if (!schoolTeacher.isEmpty()) {
			map = ReturnResult.correctResult(schoolTeacher);
		}else {
			map = ReturnResult.otherResult(1, "未获取到老师列表");
		}
		return map;
	}
	
	/**
	 * @method 通过科目获取老师
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getClassByTeacher")
	public Map<String, Object> getClassByTeacher(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-------getClassByTeacher---"+jsonObject+"--------------");
		//执行
		JSONObject teacherInfo = ixuestarCloudELService.getTeacherInfo(jsonObject);
		if (!teacherInfo.isEmpty()) {
			map = ReturnResult.correctResult(teacherInfo);
		}else {
			map = ReturnResult.otherResult(1, "未获取到老师的班级信息");
		}
		return map;
	}
	
	
	/**
	 * @method 绑定信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/bindTeacherInfo")
	public Map<String, Object> bindTeacherInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		//执行
		JSONObject bindTeacherInfo = ixuestarCloudELService.bindTeacherInfo(jsonObject);
		if (bindTeacherInfo!=null) {
			Integer code = bindTeacherInfo.getInteger("code");
			bindTeacherInfo.remove("code");
			if (code == 0) {
				map = ReturnResult.correctResult(bindTeacherInfo);
			}else if (code == 1) {
				map = ReturnResult.otherResult(1, "该教师已被绑定");
			}
		}else {
			map = ReturnResult.otherResult(1, "未获取到响应列表");
		}
		return map;
	}
	
	/**
	 * @method 上传文件
	 * @param CommonsMultipartFile
	 * @param response
	 * @return
	 */
	@ResponseBody
////	@ExceptionHandler
	@RequestMapping("/upLoadFile")
	public Map<String, Object> upLoadFile(@RequestParam("file")MultipartFile files,HttpServletRequest request,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		logger.info("-----------进入upLoadFile接口-------------");
		if (files.isEmpty()) this.validateNullException(null, "文件不能为空");
		JSONArray jsonArray = new JSONArray();
		//请求接口
//		for (int i = 0; i < files.length; i++) {
//			//获取单个文件对象
		String ytfName = request.getParameter("ytfName");
//			CommonsMultipartFile commonsMultipartFile = files[i];
			JSONObject upLoadFile = ixuestarCloudELService.upLoadFile(files,ytfName);
			jsonArray.add(upLoadFile);
//		}
		JSONObject jsonObject = new JSONObject();
		if (jsonArray.size()!=0) {
			jsonObject.put("fileList", jsonArray);
			jsonObject.put("fileNum", jsonArray.size());
			map = ReturnResult.correctResult(jsonObject);
		}else {
			map = ReturnResult.wrongResult();
		}
		return map;
	}
	
	/**
	 * @method 上传文件
	 * @param CommonsMultipartFile
	 * @param response
	 * @return
	 */
	@ResponseBody
////	@ExceptionHandler
	@RequestMapping("/upLoadFiles")
	public Map<String, Object> upLoadFile(HttpServletRequest request,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//获取文件列表
		List<MultipartFile> files = ((MultipartHttpServletRequest)request).getFiles("files");
		//非空判断
		logger.info("-----------进入upLoadFile接口-------------");
		if (files.size()==0) this.validateNullException(null, "文件不能为空");
		JSONArray jsonArray = new JSONArray();
		//请求接口
		int a = 0;
		for (int i = 0; i < files.size(); i++) {
			//获取单个文件对象
			MultipartFile multipartFile = files.get(i);
			//获取文件名称
			String ytfName = multipartFile.getOriginalFilename();
			//上传文件内容
			JSONObject upLoadFile = ixuestarCloudELService.upLoadFile(multipartFile,ytfName);
			Integer integer = upLoadFile.getInteger("code");
			if (integer==0) {
				jsonArray.add(upLoadFile);				
			}else {
				a += 1;
			}
		}
		JSONObject jsonObject = new JSONObject();
		if (jsonArray.size()!=0) {
			if (a==0) {
				jsonObject.put("fileList", jsonArray);
				jsonObject.put("fileNum", jsonArray.size());
				map = ReturnResult.correctResult(jsonObject);
			}else {
				map = ReturnResult.wrongResult();
			}
		}else {
			map = ReturnResult.wrongResult();
		}
		return map;
	}
	
	/**
	 * @method 创建订单
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping( value = "/preFileOrder")
	public Map<String, Object> preFileOrder(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		//获取参数
		String ywId = jsonObject.getString("ywId");
		String ixsId = jsonObject.getString("ixsId");
		Integer printNum = jsonObject.getInteger("printNum");
		Integer orderType = jsonObject.getInteger("orderType");
		Integer printTotal = jsonObject.getInteger("printTotal");
		JSONArray classList = jsonObject.getJSONArray("classList");
		JSONArray fileList = jsonObject.getJSONArray("fileList");
		Integer ytoDoubleSide = jsonObject.getInteger("ytoDoubleSide");
		//首先创建订单id
		//创建订单id
		String ytoId = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date())+(int)(Math.random()*10)+(int)(Math.random()*10);
		//关联订单和文件
		String ytoName = ixuestarCloudELService.writeOrderFile(fileList, ytoId);
		
		//关联订单和微信
		ixuestarCloudELService.writeOrderUser(ytoId, ywId);
		//关联订单和班级
		if (orderType==0) {
			JSONObject judgePrintStatus = ixuestarCloudELService.judgePrintStatus(ytoId, printNum, ytoDoubleSide,classList);
			//获取参数
			JSONArray canList = judgePrintStatus.getJSONArray("canList");
			JSONArray canotList = judgePrintStatus.getJSONArray("canotList");
			if (!canList.isEmpty()) {
				ixuestarCloudELService.writeOrderClass(canList, ytoId,ixsId);		
				
				JSONArray classArray = judgePrintStatus.getJSONArray("classArray");
				
				//首先创建订单
				JSONObject preFileOrder = ixuestarCloudELService.preFileOrder(ytoId, printNum, printTotal, orderType, ywId, ytoName, ytoDoubleSide);
				if (canotList.isEmpty()) {
					Integer code = preFileOrder.getInteger("code");
					if (code==0) {
						String isPay = preFileOrder.getString("isPay");
						JSONObject jsonObject2 = new JSONObject();
						jsonObject2.put("code", 0);
						jsonObject2.put("isPay", isPay);
						jsonObject2.put("ytoId", ytoId);
						jsonObject2.put("ytoType", orderType);
						jsonObject2.put("classArray", classArray);
						map = ReturnResult.correctResult(jsonObject2);
					}else if (code==1) {
						map = ReturnResult.otherResult(code, "未获取到套餐信息");
					}
				}else {
					String ixscName="";
					for (int i = 0; i < canotList.size(); i++) {
						String ixscId = canotList.get(i).toString();
						String schoolClassName = ixuestarCloudELService.getSchoolClassName(ixscId);
						if (ixscName.equals("")) {
							ixscName = schoolClassName;
						}else {
							ixscName = ixscName+","+schoolClassName;
						}
					}
					Integer code = preFileOrder.getInteger("code");
					if (code==0) {
						String isPay = preFileOrder.getString("isPay");
						JSONObject jsonObject2 = new JSONObject();
						jsonObject2.put("code", 1);
						jsonObject2.put("isPay", isPay);
						jsonObject2.put("ytoId", ytoId);
						jsonObject2.put("ytoType", orderType);
						jsonObject2.put("classArray", classArray);
						map = ReturnResult.otherJSONObjectResult(code, jsonObject2, ixscName+"的班级豆不足已被取消");
					}else if (code==1) {
						map = ReturnResult.otherResult(code, "未获取到套餐信息");
					}
				}
			}else {
				ixuestarCloudELService.deleteWxuserOrder(ytoId);
				JSONObject jsonObject2 = new JSONObject();
				jsonObject2.put("code", 2);
				jsonObject2.put("isPay", "N");
				jsonObject2.put("ytoId", ytoId);
				jsonObject2.put("ytoType", orderType);
				map = ReturnResult.otherJSONObjectResult(0, jsonObject2, "所选班级的班级打印豆均不足，下单失败");
			}
			
		}else {
			JSONObject judgeTeacherPrint = ixuestarCloudELService.judgeTeacherPrint(ytoId, ytoDoubleSide, ywId, printNum);
			Boolean bbStatus = judgeTeacherPrint.getBoolean("bbStatus");
			if (bbStatus) {
				Integer ytbNumber = judgeTeacherPrint.getInteger("ytbNumber");
				//首先创建订单
				JSONObject preFileOrder = ixuestarCloudELService.preFileOrder(ytoId, printNum, printTotal, orderType, ywId, ytoName, ytoDoubleSide);
					Integer code = preFileOrder.getInteger("code");
					if (code==0) {
						String isPay = preFileOrder.getString("isPay");
						JSONObject jsonObject2 = new JSONObject();
						jsonObject2.put("code", 0);
						jsonObject2.put("isPay", isPay);
						jsonObject2.put("ytoId", ytoId);
						jsonObject2.put("ytoType", orderType);
						jsonObject2.put("ytbNumber", ytbNumber);
						map = ReturnResult.correctResult(jsonObject2);
					}else if (code==1) {
						map = ReturnResult.otherResult(code, "未获取到套餐信息");
					}
			}else {
				JSONObject jsonObject2 = new JSONObject();
				jsonObject2.put("code", 3);
				jsonObject2.put("isPay", "N");
				jsonObject2.put("ytoId", ytoId);
				jsonObject2.put("ytoType", orderType);
				map = ReturnResult.otherJSONObjectResult(0, jsonObject2, "您的打印豆不足，下单失败");
			}
		}
		return map;
	}
	
	/**
	 * @method 获取订单的详细信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getFileOrderInfo")
	public Map<String, Object> getFileOrderInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		//获取参数
		String ytoId = jsonObject.getString("ytoId");
		//调用
		JSONObject fileOrderInfo = ixuestarCloudELService.getFileOrderInfo(ytoId);
		Integer code = fileOrderInfo.getInteger("code");
		if (code==0) {
			fileOrderInfo.remove("code");
			map = ReturnResult.correctResult(fileOrderInfo);
		}else if (code==1) {
			map = ReturnResult.otherResult(code, "订单号有误，请重新确认");
		}
		return map;
	}
	
	/**
	 * @method 获取订单列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getFileOrderList")
	public Map<String, Object> getFileOrderList(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		//获取参数
		String ywId = jsonObject.getString("ywId");
		int orderStatus = jsonObject.getInteger("orderStatus");
		Integer pageIndex = jsonObject.getInteger("pageIndex");
		Integer pageLimit = jsonObject.getInteger("pageLimit");
		//调用
		JSONObject fileOrderList = ixuestarCloudELService.getFileOrderList(ywId, pageIndex, pageLimit,orderStatus);
		//返回参数
		map = ReturnResult.correctResult(fileOrderList);
		return map;
	}
	
	/**
	 * @method 取消返还班级豆
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/deleteOrderBean")
	public Map<String, Object> deleteOrderBean(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		logger.info("-----------");
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		//获取参数
		String ytoId = jsonObject.getString("ytoId");
		//调用
		JSONObject deleteOrderBean = ixuestarCloudELService.deleteOrderBean(ytoId);
		Integer code = deleteOrderBean.getInteger("code");
		if (code==1) {
			map = ReturnResult.otherResult(code, "订单号有误，请重新输入");
		}else {
			deleteOrderBean.remove("code");
			if (code == 0) {
				map = ReturnResult.correctResult(deleteOrderBean);
			}else if(code == 2){
				map = ReturnResult.otherResult(code, "订单不可执行此操作");
			}else if(code == 3){
				map = ReturnResult.otherResult(code, "订单已打印，不可取消");
			}
		}
		return map;
	}
	
	
	
	////////////终端打印接口//////////////
	/**
	 * @method 获取订单打印数据
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getOrderPrintData")
	public Map<String, Object> getOrderPrintData(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		//获取参数
		String ytoPrintCode = jsonObject.getString("ytoPrintCode");
		//调用
		JSONObject orderPrintData = ixuestarCloudELService.getOrderPrintData(ytoPrintCode);
		logger.info("~~~~~~"+orderPrintData+"~~~~~~");
		Integer code = orderPrintData.getInteger("code");
		if (code==-1) {
			map = ReturnResult.otherResult(code, "订单号有误，请重新输入");
		}else {
			if (code == 0) {
				map = ReturnResult.correctResult(orderPrintData);
			}else if (code == 1) {
				map = ReturnResult.otherJSONObjectResult(0, orderPrintData, "订单未进行支付，请支付后在进行打印");
			}else if (code==2) { 
				map = ReturnResult.otherJSONObjectResult(0, orderPrintData, "订单已进行打印，请勿重复打印");
			}else if(code==3) {
				map = ReturnResult.otherJSONObjectResult(0, orderPrintData, "班级豆不足，请获取后再使用打印服务");
			}else if (code==4) {
				map = ReturnResult.otherJSONObjectResult(0, orderPrintData, "您的打印豆不足，请获取后再使用打印服务");
			}
		}
		return map;
	}
	
	/**
	 * @method 写入维修信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/writeMalfunction")
	public Map<String, Object> writeMalfunction(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		//获取参数
		String ixsNo = jsonObject.getString("ixsNo");
		String ymaMsg = jsonObject.getString("ymaMsg");
		String ytoPrintCode = jsonObject.getString("ytoPrintCode");
		//调用
		if (ixsNo==null || ymaMsg==null || ytoPrintCode==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核实参数");
		}else {
			ixuestarCloudELService.writeMalfunction(ytoPrintCode, ixsNo, ymaMsg);
			//返回
			map = ReturnResult.correctResult(new JSONObject());
		}
		return map;
	}
	
	/**
	 * @method 写入维修信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/updatePrintInfo")
	public Map<String, Object> updatePrintInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		//获取参数
		String ytoId = jsonObject.getString("ytoId");
		String ytoMachinecode = jsonObject.getString("ytoMachinecode");
		//调用
		if (ytoId==null || ytoMachinecode==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核实参数");
		}else {
			Integer updatePrintInfo = ixuestarCloudELService.updatePrintInfo(ytoId, ytoMachinecode);
			if (updatePrintInfo==0) {
				map = ReturnResult.correctResult(new JSONObject());
			}else {
				//返回
				map = ReturnResult.otherResult(1, "订单号有误，请核实");
			}
		}
		return map;
	}
	
	/**
	 * @method 获取订单打印数据
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/rebindingTeacherInfo")
	public Map<String, Object> rebindingTeacherInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入rebindingTeacherInfo接口-------------");
		//获取参数
		String ywId = jsonObject.getString("ywId");
		String ixstId = jsonObject.getString("ixstId");
		JSONArray ixscIds = jsonObject.getJSONArray("ixscIds");
		if (ywId==null || ixstId==null || ixscIds==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject updateTeacherbindInfo = ixuestarCloudELService.updateTeacherbindInfo(ywId, ixstId, ixscIds);
			if (updateTeacherbindInfo==null) {
				map = ReturnResult.otherResult(1, "未获取到该参数的数据内容");
			}else {				
				map = ReturnResult.correctResult(updateTeacherbindInfo);
			}
		}
		return map;
	}
	
	
	/**
	 * @method 修改订单打印状态
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/updateFileOrderStatus")
	public Map<String, Object> updateFileOrderStatus(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		String ytoPrintCode = jsonObject.getString("ytoPrintCode");
		//执行修改
		ixuestarCloudELService.updateFileOrderStatus(ytoPrintCode);
		map = ReturnResult.correctResult(new JSONObject());
		return map;
	}
	
	/**
	 * @method 获取班级签到列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getClockInClass")
	public Map<String, Object> getClockInClass(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getClockInClass接口-------------");
		//获取参数
		String ixscId = jsonObject.getString("ixscId");
		Integer pageIndex = jsonObject.getInteger("pageIndex");
		Integer pageSize = jsonObject.getInteger("pageSize");
		if (ixscId==null || pageIndex==null || pageSize==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject clockInClass = ixuestarCloudELService.getClockInClass(ixscId, pageIndex, pageSize);
			//获取返回
			if (clockInClass==null) {
				map = ReturnResult.otherResult(1, "未获取到相关参数的数据内容");
			}else {
				map = ReturnResult.correctResult(clockInClass);					
			}
		}
		return map;
	}
	
	/**
	 * @method 获取未签到学生列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getnoSigninListudents")
	public Map<String, Object> getnoSigninListudents(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getnoSigninListudents接口-------------");
		//获取参数
		String ixscId = jsonObject.getString("ixscId");
		String ycDate = jsonObject.getString("ycDate");
		if (ixscId==null || ixscId.replace("\\s*", "").equals("") || ycDate==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject signinListudents = ixuestarCloudELService.getSigninListudents(ixscId, ycDate);
			//获取返回
			if (signinListudents==null) {
				map = ReturnResult.otherResult(1, "未获取到相关参数的数据内容");
			}else {
				Integer code = signinListudents.getInteger("code");
				if (code==0) {
					signinListudents.remove("code");
					map = ReturnResult.correctResult(signinListudents);					
				}else if (code==1) {
					map = ReturnResult.otherResult(2, "班级学生已经全部签到");					
				}
			}
		}
		return map;
	}
	
	
	/**
	 * @method 根据日期获取签到学生列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getDateClockInClass")
	public Map<String, Object> getDateClockInClass(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getDateClockInClass接口-------------");
		//获取参数
		String ixscId = jsonObject.getString("ixscId");
		String startDate = jsonObject.getString("startDate");
		String stopDate = jsonObject.getString("stopDate");
		if (ixscId==null || startDate==null || stopDate==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject dateClockInClass = ixuestarCloudELService.getDateClockInClass(ixscId, startDate, stopDate);
			//获取返回
			if (dateClockInClass==null) {
				map = ReturnResult.otherResult(1, "未获取到相关参数的数据内容");
			}else {
				Integer code = dateClockInClass.getInteger("code");
				if (code==0) {
					dateClockInClass.remove("code");
					map = ReturnResult.correctResult(dateClockInClass);					
				}else if (code==1) {
					map = ReturnResult.otherResult(2, "所选日期内没有签到数据");					
				}
			}
		}
		return map;
	}
	
	/**
	 * @method 获取班主任积分
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getHeadTeacherPoints")
	public Map<String, Object> getHeadTeacherPoints(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getHeadTeacherPoints接口-------------");
		//获取参数
		String ixstId = jsonObject.getString("ixstId");
		if (ixstId==null || ixstId.replaceAll("\\s*", "").equals("")) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject headTeacherPoints = ixuestarCloudELService.getHeadTeacherPoints(ixstId);
			//获取返回
			if (headTeacherPoints==null) {
				map = ReturnResult.otherResult(1, "未获取到相关参数的数据内容");
			}else {
				map = ReturnResult.correctResult(headTeacherPoints);					
			}
		}
		return map;
	}
	
	
	/**
	 * @method 提现申请
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getApplicationForWithdrawal")
	public Map<String, Object> getApplicationForWithdrawal(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getApplicationForWithdrawal接口-------------");
		//获取参数
		String ywId = jsonObject.getString("ywId");
		String ybcName = jsonObject.getString("ybcName");
		String ybcIdCard = jsonObject.getString("ybcIdCard");
		String ybcCreditcard = jsonObject.getString("ybcCreditcard");
		String ybcBankName = jsonObject.getString("ybcBankName");
		double ywoAmount = jsonObject.getDouble("ywoAmount");
		if (ywId==null || ybcName==null || ybcIdCard==null || ybcCreditcard==null || ybcBankName==null || ywoAmount==0.0) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject applicationForWithdrawal = ixuestarCloudELService.getApplicationForWithdrawal(ybcName, ybcIdCard, ybcCreditcard, ybcBankName, ywId, ywoAmount);
			//获取返回
			if (applicationForWithdrawal==null) {
				map = ReturnResult.otherResult(1, "未获取到相关参数的数据内容");
			}else {
				Integer code = applicationForWithdrawal.getInteger("code");
				if (code==0) {
					applicationForWithdrawal.remove("code");
					map = ReturnResult.correctResult(applicationForWithdrawal);					
				}else if (code==1) {
					map = ReturnResult.otherResult(2, "每月最多可申请提现一次！");					
				}else if (code==2) {
					map = ReturnResult.otherResult(3, "对不起，未达到提现标准！");
				}
			}
		}
		return map;
	}
	
	/**
	 * @method 获取提现的银行账号信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getBankcardInfo")
	public Map<String, Object> getBankcardInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getBankcardInfo接口-------------");
		//获取参数
		String ywId = jsonObject.getString("ywId");
		if (ywId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject bankcardInfo = ixuestarCloudELService.getBankcardInfo(ywId);
			//获取返回
			if (bankcardInfo==null) {
				map = ReturnResult.otherResult(1, "未获取到相关参数的数据内容");
			}else {
				map = ReturnResult.correctResult(bankcardInfo);					
			}
		}
		return map;
	}
	
	/**
	 * @method 修改银行账号信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/updateBankcardInfo")
	public Map<String, Object> updateBankcardInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入updateBankcardInfo接口-------------");
		//获取参数
		String ybcId = jsonObject.getString("ybcId");
		if (ybcId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject updateBankcardInfo = ixuestarCloudELService.updateBankcardInfo(jsonObject);
			//获取返回
			if (updateBankcardInfo==null) {
				map = ReturnResult.otherResult(1, "未获取到相关参数的数据内容");
			}else {
				map = ReturnResult.correctResult(updateBankcardInfo);					
			}
		}
		return map;
	}
	
	/**
	 * @method 获取提现列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getWithdrawalList")
	public Map<String, Object> getWithdrawalList(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getWithdrawalList接口-------------");
		//获取参数
		String ywId = jsonObject.getString("ywId");
		Integer pageIndex = jsonObject.getInteger("pageIndex");
		Integer pageSize = jsonObject.getInteger("pageSize");
		if (ywId==null || pageIndex==null || pageSize==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject withdrawalList = ixuestarCloudELService.getWithdrawalList(ywId, pageIndex, pageSize);
			//获取返回
			if (withdrawalList==null) {
				map = ReturnResult.otherResult(1, "未获取到相关参数的数据内容");
			}else {
				map = ReturnResult.correctResult(withdrawalList);					
			}
		}
		return map;
	}
	
	/**
	 * @method 获取班级通讯录
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getClassAddressBook")
	public Map<String, Object> getClassAddressBook(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//返回容器
		Map<String, Object> map = null;
		//获取参数
		String ixstId = jsonObject.getString("ixstId");
		String ixscId = jsonObject.getString("ixscId");
		//判断参数
		if (ixstId==null || ixscId==null) {
			map = ReturnResult.otherResult(-1, "参数名有误，请核实");
		}else {
			JSONObject classAddressBook = ixuestarCloudELService.getClassAddressBook(ixstId, ixscId);
			Integer code = classAddressBook.getInteger("code");
			classAddressBook.remove("code");
			if (code==0) {
				map = ReturnResult.correctResult(classAddressBook);
			}else if (code==1) {
				map = ReturnResult.otherResult(1, "该老师和班级不符");
			}else {
				map = ReturnResult.otherResult(2, "未获取到改班级绑定的学生信息");
			}
		}
		return map;
	}
	
	/**
	 * @method 查询课程表
	 * @param request
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getClasschdeul")
	public Map<String, Object> getClasschedul(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空！");
		//获取参数
		String ixscId = jsonObject.getString("ixscId");
		if (ixscId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核实");
		}else {
			//执行查询参数
			JSONObject classSchedule = ixuestarCloudELService.getClassSchedule(ixscId);
			Integer code = classSchedule.getInteger("code");
			classSchedule.remove("code");
			if (code==0) {
				//结果返回
				map = ReturnResult.correctResult(classSchedule);
			}else if (code==1) {
				map = ReturnResult.otherResult(code, "查询不到该班级信息");
			}else if (code==2) {
				map = ReturnResult.otherResult(code, "未获取到该班级年级课程规则，请联系管理员添加");
			}
		}
		return map;
	}
	
	/**
	 * @method 修改课程表
	 * @param request
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/writeClasschdeul")
	public Map<String, Object> writeClasschdeul(@RequestBody JSONObject jsonObject, HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空！");
		//获取参数
		Integer issueCode = jsonObject.getInteger("issueCode");
		JSONArray classchdule = jsonObject.getJSONArray("classchdule");
		if (issueCode==null || classchdule==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核实");
		}else {
			List<YxClassschedule> classchduleList = classchdule.toJavaList(YxClassschedule.class);
			//执行查询参数
			ixuestarCloudELService.writeClassSchedule(classchduleList, issueCode);
			//结果返回
			map = ReturnResult.correctResult(new JSONObject());
		}
		return map;
	}
	
	/**
	 * @method 获取科目列表
	 * @param request
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getSubjectList")
	public Map<String, Object> getSubjectList(HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		Integer ysPhases = 1;
		Integer ysStatus = 1;
		JSONObject classSubjectInfo = ixuestarCloudELService.getClassSubjectInfo(ysPhases, ysStatus);
		//获取code
		Integer code = classSubjectInfo.getInteger("code");
		classSubjectInfo.remove("code");
		//判断
		if (code==0) {
			map = ReturnResult.correctResult(classSubjectInfo);
		}else {
			map = ReturnResult.otherResult(1, "未获取到科目列表");
		}
		return map;
	}
	
	
	/**
	 * @method 发布信息
	 * @param request
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/writeIssueClassNoticeInfo")
	public Map<String, Object> writeIssueClassNoticeInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		//获取参数
		String ixstId = jsonObject.getString("ixstId");
		Integer ycnType = jsonObject.getInteger("ycnType");
		Integer ycnFlag = jsonObject.getInteger("ycnFlag");
		String ycnContent = jsonObject.getString("ycnContent");
		Integer ycnAnwType = jsonObject.getInteger("ycnAnwType");
		JSONArray ixscIdArray = jsonObject.getJSONArray("ixscIds");
		JSONArray fileIdArray = jsonObject.getJSONArray("fileIds");
		//非空测试
		if (ycnFlag==null) ycnFlag = 0;
		
		JSONObject writeIssueClassNoticeInfo = ixuestarCloudELService.writeIssueClassNoticeInfo(ycnFlag, ycnType, ycnContent, ycnAnwType, ixstId, ixscIdArray, fileIdArray);
		//判断
		if (writeIssueClassNoticeInfo==null) {
			map = ReturnResult.otherResult(1, "未获取到参数信息");
		}else {
			Integer code = writeIssueClassNoticeInfo.getInteger("code");
			writeIssueClassNoticeInfo.remove("code");
			if (code==0) {
				map = ReturnResult.correctResult(writeIssueClassNoticeInfo);				
			}else {
				map = ReturnResult.otherResult(2, "您今天的发布次数已达上限");
			}
			
		}
		return map;
	}
	
	/**
	 * @method 获取发布信息列表
	 * @param request
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getIssueclassnoticeList")
	public Map<String, Object> getIssueclassnoticeList(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		//获取参数
		String ixstId = jsonObject.getString("ixstId");
		String ixscId = jsonObject.getString("ixscId");
		Integer ycnFlag = jsonObject.getInteger("ycnFlag");
		Integer pageIndex = jsonObject.getInteger("pageIndex");
		Integer pageLimit = jsonObject.getInteger("pageLimit");
		Integer requestType = jsonObject.getInteger("requestType");
		//非空判断
		if (ycnFlag==null) ycnFlag = 0;
		
		JSONObject issueclassnoticeList = ixuestarCloudELService.getIssueclassnoticeList(ycnFlag, requestType, ixscId, ixstId, pageIndex, pageLimit);
		//判断
		if (issueclassnoticeList==null) {
			map = ReturnResult.otherResult(1, "未获取到参数信息");
		}else {
			map = ReturnResult.correctResult(issueclassnoticeList);
		}
		return map;
	}
	
	/**
	 * @method 获取通知的回复列表
	 * @param request
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getReplyclassnotice")
	public Map<String, Object> getReplyclassnotice(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		//获取参数
		String ycnId = jsonObject.getString("ycnId");
		String ixscId = jsonObject.getString("ixscId");
		Integer pageIndex = jsonObject.getInteger("pageIndex");
		Integer pageLimit = jsonObject.getInteger("pageLimit");
		//执行
		JSONObject replyclassnotice = ixuestarCloudELService.getReplyclassnotice(ixscId, ycnId, pageIndex, pageLimit);
		//判断
		if (replyclassnotice==null) {
			map = ReturnResult.otherResult(1, "未获取到参数信息");
		}else {
			map = ReturnResult.correctResult(replyclassnotice);
		}
		return map;
	}
	
	/**
	 * @method 获取通知的查看和未查看列表
	 * @param request
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getChecktheNotice")
	public Map<String, Object> getChecktheNotice(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		//获取参数
		String ycnId = jsonObject.getString("ycnId");
		String ixscId = jsonObject.getString("ixscId");
		if (ycnId==null || ixscId==null) {
			map = ReturnResult.otherResult(-1, "参数有误");
		}
		//执行
		JSONObject checktheNotice = ixuestarCloudELService.getChecktheNotice(ixscId, ycnId);
		//判断
		if (checktheNotice==null) {
			map = ReturnResult.otherResult(1, "未获取到参数信息");
		}else {
			map = ReturnResult.correctResult(checktheNotice);
		}
		return map;
	}
	
	/**
	 * @method 获取通知的回复列表
	 * @param request
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/upLoadNoticeFile")
	public Map<String, Object> upLoadNoticeFile(@RequestParam(value = "files")MultipartFile[] milMultipartFiles,
			@RequestParam(value = "fileNames") List<String> fileNames,@RequestParam(value = "noticeType")Integer noticeType,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		if (milMultipartFiles.length==0) this.validateNullException(null, "文件数组不能为空");;
		//获取参数
		if (milMultipartFiles==null || fileNames==null || noticeType==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			//循环上传文件
			JSONObject jsonObject = new JSONObject();
			JSONArray jsonArray = new JSONArray();
			for (int i = 0; i < milMultipartFiles.length; i++) {
				MultipartFile multipartFile = milMultipartFiles[i];
				String fileName = fileNames.get(i);
				//上传
				JSONObject upLoadNoticeFile = ixuestarCloudELService.upLoadNoticeFile(multipartFile, fileName, noticeType);
				jsonArray.add(upLoadNoticeFile);
			}			
			//添加返回
			jsonObject.put("fileList", jsonArray);
			jsonObject.put("fileLength", jsonArray.size());
			map = ReturnResult.correctResult(jsonObject);
		}
		return map;
	}
	
	/**
	 * @method 删除通知
	 * @param request
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/deleteIssueclassnotice")
	public Map<String, Object> deleteIssueclassnotice(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数对象不能为空");
		//获取参数
		String ycnId = jsonObject.getString("ycnId");
		String ixstId = jsonObject.getString("ixstId");
		if (ycnId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			Integer code = ixuestarCloudELService.deleteIssueclassnotice(ycnId,ixstId);
			if (code==0) {
				//返回
				map = ReturnResult.correctResult(jsonObject);
			}else if (code==1) {
				map = ReturnResult.otherResult(code, "未查询到该ycnId的消息");
			}else if (code==2) {
				map = ReturnResult.otherResult(code, "该老师没有删除该通知的权限");
			}

		}
		return map;
	}
	
	/**
	 * @method 获取班级的签到情况和绑定情况
	 * @param request
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getBindSignStuInfo")
	public Map<String, Object> getBindSignStuInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数对象不能为空");
		//获取参数
		String ixscId = jsonObject.getString("ixscId");
		if (ixscId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject signinfortheday = ixuestarCloudELService.getSigninfortheday(ixscId);
			if (signinfortheday==null) {
				//返回
				map = ReturnResult.otherResult(1, "未查询到该班级的消息");
			}else {
				map = ReturnResult.correctResult(signinfortheday);
			}
		}
		return map;
	}
	
	/**
	 * @method 获取班级学生列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getStudentsForIxscId")
	public Map<String, Object> getStudentsForIxscId(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		String ixscId = jsonObject.getString("ixscId");
		//参数判断
		if (ixscId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject studentsForIxscId = ixuestarCloudELService.getStudentsForIxscId(ixscId);
			if (studentsForIxscId==null) {
				//返回
				map = ReturnResult.otherResult(1, "未查询到该班级的消息");
			}else {
				map = ReturnResult.correctResult(studentsForIxscId);
			}
		}
		return map;
	}
	
	/**
	 * @method 获取班级学生列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/writeExamInfo")
	public Map<String, Object> writeExamInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		String ixstId = jsonObject.getString("ixstId");
		String ixscId = jsonObject.getString("ixscId");
		String yenName = jsonObject.getString("yenName");
		String yenDate = jsonObject.getString("yenDate");
		String yenPoints = jsonObject.getString("yenPoints");
		String yenSubject = jsonObject.getString("yenSubject");
		Integer yenStatus = jsonObject.getInteger("yenStatus");
		JSONArray stuScoreList = jsonObject.getJSONArray("stuScoreList");
		//参数判断
		if (ixscId==null || ixstId==null || yenName==null || yenDate==null || yenPoints==null 
				|| yenSubject==null || yenSubject==null || yenStatus==null || stuScoreList==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject writeExamInfo = ixuestarCloudELService.writeExamInfo(yenName, yenDate, ixscId, yenPoints, yenSubject, ixstId, yenStatus, stuScoreList);
			if (writeExamInfo==null) {
				//返回
				map = ReturnResult.otherResult(1, "未查询到该班级的消息");
			}else {
				Integer code = writeExamInfo.getInteger("code");
				if (code==0) {
					writeExamInfo.remove("code");
					map = ReturnResult.correctResult(writeExamInfo);
				}else if (code==1) {
					map = ReturnResult.otherResult(2, "您本周的发布次数已达上限");
				}
			}
		}
		return map;
	}
	
	/**
	 * @method 获取班级学生列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/updateTestScoreInfo")
	public Map<String, Object> updateTestScoreInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		String yenId = jsonObject.getString("yenId");
		Integer yenStatus = jsonObject.getInteger("yenStatus");
		JSONArray stuScoreList = jsonObject.getJSONArray("stuScoreList");
		//参数判断
		if (yenId==null || yenStatus==null || stuScoreList==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject updateTestScoreInfo = ixuestarCloudELService.updateTestScoreInfo(yenId, stuScoreList, yenStatus);
			if (updateTestScoreInfo==null) {
				//返回
				map = ReturnResult.otherResult(1, "未查询到该班级的消息");
			}else {
				Integer code = updateTestScoreInfo.getInteger("code");
				if (code == 0) {
					map = ReturnResult.correctResult(updateTestScoreInfo);					
				}else if (code == 1) {
					map = ReturnResult.otherResult(2, "成绩编辑次数已达上限");
				} 
			}
		}
		return map;
	}
	
	/**
	 * @method 获取班级学生列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getYxExaminations")
	public Map<String, Object> getYxExaminations(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		String ixstId = jsonObject.getString("ixstId");
		String ixscId = jsonObject.getString("ixscId");
		Integer pageIndex = jsonObject.getInteger("pageIndex");
		Integer pageLimit = jsonObject.getInteger("pageLimit");
		//参数判断
		if (ixstId==null || ixscId==null || pageIndex==null || pageLimit==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject yxExaminations = ixuestarCloudELService.getYxExaminations(ixstId, ixscId, pageIndex, pageLimit);
			if (yxExaminations==null) {
				//返回
				map = ReturnResult.otherResult(1, "未查询到该班级的消息");
			}else {
				map = ReturnResult.correctResult(yxExaminations);
			}
		}
		return map;
	}
	
	/**
	 * @method 获取班级学生列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getTestScoreInfo")
	public Map<String, Object> getTestScoreInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		String yenId = jsonObject.getString("yenId");
		String ixscId = jsonObject.getString("ixscId");
		Integer yenStatus = jsonObject.getInteger("yenStatus");
		//参数判断
		if (yenId==null || ixscId==null || yenStatus==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject testScoreInfo = ixuestarCloudELService.getTestScoreInfo(yenId, ixscId, yenStatus);
			if (testScoreInfo==null) {
				//返回
				map = ReturnResult.otherResult(1, "未查询到该班级的消息");
			}else {
				map = ReturnResult.correctResult(testScoreInfo);
			}
		}
		return map;
	}
	
	/**
	 * @method 获取班级学生列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/deleteYxExaminations")
	public Map<String, Object> deleteYxExaminations(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		String yenId = jsonObject.getString("yenId");
		String ixstId = jsonObject.getString("ixstId");
		//参数判断
		if (yenId==null || ixstId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			Integer code = ixuestarCloudELService.deleteYxExaminations(ixstId, yenId);
			if (code==0) {
				//返回
				map = ReturnResult.correctResult(jsonObject);
			}else if(code==1){
				map = ReturnResult.otherResult(code, "未获取到yenId的信息");
			}else {
				map = ReturnResult.otherResult(code, "没有权限删除");
			}
		}
		return map;
	}
	
	/**
	 * @method 获取发布的次数
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getIssueResidueDegree")
	public Map<String, Object> getIssueResidueDegree(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		String ixscId = jsonObject.getString("ixscId");
		String ixstId = jsonObject.getString("ixstId");
		Integer issType = jsonObject.getInteger("issType");
		
		//参数判断
		if (ixscId==null || ixstId==null || issType==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject issueResidueDegree = ixuestarCloudELService.getIssueResidueDegree(ixstId, ixscId, issType);
			if (issueResidueDegree!=null) {
				//返回
				map = ReturnResult.correctResult(issueResidueDegree);
			}else {
				map = ReturnResult.otherResult(1, "未获取到数据");
			}
		}
		return map;
	}
	
	/**
	 * @method 获取科目列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getSubjectLists")
	public Map<String, Object> getSubjectLists(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		Integer ysPhases = jsonObject.getInteger("ysPhases");
		
		//参数判断
		if (ysPhases==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject subjectList = ixuestarCloudELService.getSubjectList(ysPhases);
			if (subjectList!=null) {
				//返回
				map = ReturnResult.correctResult(subjectList);
			}else {
				map = ReturnResult.otherResult(1, "未获取到数据");
			}
		}
		return map;
	}
	
	/**
	 * @method 获取打印豆
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getPrintBean")
	public Map<String, Object> getPrintBean(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		Integer ytype = jsonObject.getInteger("ytype");
		JSONArray idList = jsonObject.getJSONArray("idList");
		//参数判断
		if (ytype==null || idList.isEmpty()) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject printBean = ixuestarCloudELService.getPrintBean(ytype,idList);
			if (printBean!=null) {
				//返回
				map = ReturnResult.correctResult(printBean);
			}else {
				map = ReturnResult.otherResult(1, "未获取到数据");
			}
		}
		return map;
	}
	
	
	///////////////////////////////////
	////////云易学家长端小程序开发
	///////////////////////////////////
	
	/**
	 * @method 通过手机号获取信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getWxSessionKeyParent")
	public Map<String, Object> getWxSessionKeyParent(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		try {
			logger.info("-----------进入getWxSessionKey接口-------------");
			String code = jsonObject.getString("code");
			//执行接口
			JSONObject wxSessionKeyParent = ixuestarCloudELService.getWxSessionKeyParent(code);
			if (!wxSessionKeyParent.isEmpty()) {
				Integer ccode = wxSessionKeyParent.getInteger("code");
				wxSessionKeyParent.remove("code");
				if (ccode==0) {
					//获取正确返回
					map = ReturnResult.correctResult(wxSessionKeyParent);									
				}else if (ccode==1) {
					map = ReturnResult.otherJSONObjectResult(ccode, wxSessionKeyParent, "首次登陆");
				}else if (ccode==2) {
					map = ReturnResult.otherJSONObjectResult(ccode, wxSessionKeyParent, "登录但未绑定");
				}
			}else {
				//错误返回
				map = ReturnResult.otherResult(-1, "参数不正确");
			}
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			map = ReturnResult.wrongResult();
		}
		return map;
	}
	

	/**
	 * @method 通过手机号获取信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getWxuserParentInfo")
	public Map<String, Object> getWxTelephoneParent(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getWxuserParentInfo接口-------------");
		//请求接口
		JSONObject wxUserParentInfo = ixuestarCloudELService.getWxUserParentInfo(jsonObject);
		if (!wxUserParentInfo.isEmpty()) {
			Integer code = wxUserParentInfo.getInteger("code");
			if (code==0) {
				map = ReturnResult.correctResult(wxUserParentInfo);
			}else if(code==1) {
				map = ReturnResult.otherJSONObjectResult(0, wxUserParentInfo, "请绑定学生信息后使用");
			}
		}else {
			map = ReturnResult.wrongResult();
		}
		return map;
	}
	
	
	/**
	 * @method 获取班级的学生列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getSchoolStuList")
	public Map<String, Object> getSchoolStuList(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getSchoolStuList接口-------------");
		//请求接口
		JSONObject schoolStudentList = ixuestarCloudELService.getSchoolStudentList(jsonObject);
		if (!schoolStudentList.isEmpty()) {
			map = ReturnResult.correctResult(schoolStudentList);
		}else {
			map = ReturnResult.otherResult(1, "未获取到该班级的学生列表");
		}
		return map;
	}
	
	/**
	 * @method 绑定学生信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/bindStudentInfo")
	public Map<String, Object> bindStudentInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入bindStudentInfo接口-------------");
		//请求接口
		String ywId = jsonObject.getString("ywId");
		String ixssId = jsonObject.getString("ixssId");
		JSONObject bindStudentInfo = ixuestarCloudELService.bindStudentInfo(ywId, ixssId);
		if (!bindStudentInfo.isEmpty()) {
			Integer code = bindStudentInfo.getInteger("code");
			if (code==0) {
				map = ReturnResult.correctResult(bindStudentInfo);
			}else if (code==1) {
				map = ReturnResult.otherJSONObjectResult(0, bindStudentInfo, "微信信息id有误，未获取到数据");
			}else if (code==2) {
				map = ReturnResult.otherJSONObjectResult(0, bindStudentInfo, "学生信息id已经绑定，请勿重复绑定");
			}
		}else {
			map = ReturnResult.wrongResult();
		}
		return map;
	}
	
	/**
	 * @method 绑定学生信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/rebindStudentInfo")
	public Map<String, Object> rebindStudentInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入rebindStudentInfo接口-------------");
		//请求接口
		String ywId = jsonObject.getString("ywId");
		String ixssId = jsonObject.getString("ixssId");
		JSONObject bindStudentInfo = ixuestarCloudELService.rebindStudentInfo(ywId, ixssId);
		if (!bindStudentInfo.isEmpty()) {
			Integer code = bindStudentInfo.getInteger("code");
			if (code==0) {
				map = ReturnResult.correctResult(bindStudentInfo);
			}else if (code==1) {
				map = ReturnResult.otherJSONObjectResult(0, bindStudentInfo, "微信信息id有误，未获取到数据");
			}
		}else {
			map = ReturnResult.wrongResult();
		}
		return map;
	}
	
	/**
	 * @method 获取打印订单列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getPrintOrderList")
	public Map<String, Object> getPrintOrderList(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getPrintOrderList接口-------------");
		//请求接口
		String ixscId = jsonObject.getString("ixscId");
		Integer listType = jsonObject.getInteger("listType");
		Integer pageIndex = jsonObject.getInteger("pageIndex");
		Integer pageLimit = jsonObject.getInteger("pageLimit");
		JSONObject classFileOrderPrintList = ixuestarCloudELService.getClassFileOrderPrintList(ixscId, pageIndex, pageLimit, listType);
		if (!classFileOrderPrintList.isEmpty()) {
			map = ReturnResult.correctResult(classFileOrderPrintList);
		}else {
			map = ReturnResult.wrongResult();
		}
		return map;
	}
	
	/**
	 * @method 获取订单的详细信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getFileOrderPrintData")
	public Map<String, Object> getFileOrderPrintData(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getFileOrderPrintData接口-------------");
		//请求接口
		String ytoId = jsonObject.getString("ytoId");
		JSONObject fileOrderPrintData = ixuestarCloudELService.getFileOrderPrintData(ytoId);
		if (!fileOrderPrintData.isEmpty()) {
			Integer code = fileOrderPrintData.getInteger("code");
			if (code==0) {
				fileOrderPrintData.remove("code");
				map = ReturnResult.correctResult(fileOrderPrintData);				
			}else if (code==1) {
				map = ReturnResult.otherResult(code, "订单号有误，请核实");
			}
		}else {
			map = ReturnResult.wrongResult();
		}
		return map;
	}
	
	/**
	 * @method 获取订单的详细信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getEduArticles")
	public Map<String, Object> getEduArticles(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		logger.info("-----------进入getEduArticles接口-------------");
		this.validateObjectNullException(jsonObject, "参数不能为空");
		//非空判断
		String ywOpenId = jsonObject.getString("ywOpenId");
		if (ywOpenId==null || ywOpenId.replace("\\s*", "").equals("")) {
			map = ReturnResult.otherResult(1, "参数有误或为空值，请核对");
		}else {
			//请求接口
			JSONObject yxEduArticles = ixuestarCloudELService.getYxEduArticles(ywOpenId);
			if (!yxEduArticles.isEmpty()) {
				map = ReturnResult.correctResult(yxEduArticles);
			}else {
				map = ReturnResult.wrongResult();
			}
		}

		return map;
	}
	
	/**
	 * @method 获取文章的详细信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getEduArticlesInfo")
	public Map<String, Object> getEduArticlesInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		logger.info("-----------进入getEduArticlesInfo接口-------------");
		this.validateObjectNullException(jsonObject, "参数不能为空");
		//非空判断
		String yeaId = jsonObject.getString("yeaId");
		String ywOpenId = jsonObject.getString("ywOpenId");
		if (yeaId==null || yeaId.replace("\\s*", "").equals("") || ywOpenId==null || ywOpenId.replace("\\s*", "").equals("")) {
			map = ReturnResult.otherResult(1, "参数有误或为空值，请核对");
		}else {
			//请求接口
			JSONObject yxEduArticlesInfo = ixuestarCloudELService.getYxEduArticlesInfo(yeaId,ywOpenId);
			if (!yxEduArticlesInfo.isEmpty()) {
				map = ReturnResult.correctResult(yxEduArticlesInfo);
			}else {
				map = ReturnResult.wrongResult();
			}
		}

		return map;
	}
	
	/**
	 * @method 写入广告观看者
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/writeWatchAdsInfo")
	public Map<String, Object> writeWatchAdsInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入writeWatchAdsInfo接口-------------");
		//请求接口
		String ywId = jsonObject.getString("ywId");
		if (ywId==null || ywId.replace("\\s*", "").equals("")) {
			map = ReturnResult.otherResult(1, "参数有误或者是空值，请核实");
		}else {
			Integer ywaType = jsonObject.getInteger("ywaType");
			if (ywaType==null) ywaType = 1;
			//执行
			JSONObject writeWatchAdsInfo = ixuestarCloudELService.writeWatchAdsInfo(ywId,ywaType);
			if (ywaType==1) {
				//结果
				writeWatchAdsInfo.put("code", 1);
			}else if (ywaType==2) {
				writeWatchAdsInfo.put("code", 2);
			}
			map = ReturnResult.correctResult(writeWatchAdsInfo);				
			
		}
		return map;
	}
	
	/**
	 * @method 获取学校详情
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getSchoolInfoBym")
	public Map<String, Object> getSchoolInfoBym(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getSchoolInfoBym接口-------------");
		//请求接口
		JSONObject schoolInfoBym = ixuestarCloudELService.getSchoolInfoBym(jsonObject);
		Integer code = schoolInfoBym.getInteger("code");
		if (code==0) {
			//结果
			map = ReturnResult.correctResult(schoolInfoBym);			
		}else {
			map = ReturnResult.otherResult(1, "没有查询到该学校");
		}
		return map;
	}
	
	/**
	 * @method 获取文件详情
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/getYxtorderFiles")
	public Map<String, Object> getYxtorderFiles(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getYxtorderFiles接口-------------");
		//获取参数
		String ytoId = jsonObject.getString("ytoId");
		if (ytoId==null) {
			map = ReturnResult.otherResult(1, "为获取到相关参数");
		}else {
			JSONObject yxtorderFiles = ixuestarCloudELService.getYxtorderFiles(ytoId);
			if (yxtorderFiles==null) {
				map = ReturnResult.otherResult(2, "为获取到该订单的文件列表");
			}else {
				map = ReturnResult.correctResult(yxtorderFiles);
			}
		}
		return map;
	}
	
	
	/**
	 * @method 判断班级签到是否合格
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/isQualified")
	public Map<String, Object> isQualified(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入isQualified接口-------------");
		//获取参数
		String ixscId = jsonObject.getString("ixscId");
		if (ixscId==null) {
			map = ReturnResult.otherResult(1, "为获取到相关参数");
		}else {
			boolean punchInRate = ixuestarCloudELService.getPunchInRate(ixscId);
			JSONObject jsonObject2 = new JSONObject();
			if (punchInRate) {
				jsonObject2.put("code", 0);
				jsonObject2.put("isQualified", true);
				map = ReturnResult.correctResult(jsonObject2);
			}else {
				jsonObject2.put("code", 1);
				jsonObject2.put("isQualified", false);
				map = ReturnResult.correctResult(jsonObject2);
			}
		}
		return map;
	}
	
	/**
	 * @method 写入文章的点赞浏览收藏
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
//	@ExceptionHandler
	@RequestMapping(value = "/writeArticlesLikeReadCollect")
	public Map<String, Object> writeArticlesLikeReadCollect(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入writeArticlesLikeReadCollect接口-------------");
		//获取参数
		String yeaId = jsonObject.getString("yeaId");
		String ywOpenId = jsonObject.getString("ywOpenId");
		Integer operation = jsonObject.getInteger("operation");
		Integer operationType = jsonObject.getInteger("operationType");
		if (yeaId==null || ywOpenId==null || operation==null || operationType==null) {
			map = ReturnResult.otherResult(1, "参数有误，请核对");
		}else {
			JSONObject articlesLikeReadCollect = ixuestarCloudELService.writeArticlesLikeReadCollect(ywOpenId, yeaId, operation, operationType);
			//获取返回
			if (articlesLikeReadCollect==null) {
				map = ReturnResult.otherResult(-1, "未获取到相关参数的数据内容");
			}else {
				map = ReturnResult.correctResult(articlesLikeReadCollect);
			}
			
		}
		return map;
	}
	
	/**
	 * @method 获取广告
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getAdvertisingInfo")
	public Map<String, Object> getAdvertisingInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getAdvertisingInfo接口-------------");
		//获取参数
		String yasId = jsonObject.getString("yasId");
		String ywOpenId = jsonObject.getString("ywOpenId");
		if (ywOpenId==null || ywOpenId.replace("\\s*", "").equals("")) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			logger.info("----------getAdvertisingInfo-"+jsonObject+"-------------");
//			JSONObject cloudelAdvertising = ixuestarCloudELService.getCloudelAdvertising(ywOpenId, yasId);
			JSONObject cloudelAdvertising = ixuestarCloudELService.gettingDisplayAds(ywOpenId, yasId);
			//获取返回
			if (cloudelAdvertising==null) {
				map = ReturnResult.otherResult(1, "未获取到相关参数的数据内容");
			}else {
				Integer code = cloudelAdvertising.getInteger("code");
				if (code==0) {
					cloudelAdvertising.remove("code");
					map = ReturnResult.correctResult(cloudelAdvertising);					
				}else {
					map = ReturnResult.otherResult(2, "展示微信广告");
				}
			}
		}
		return map;
	}
	
	/**
	 * @method 领取优惠券
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getTenPromotionCode")
	public Map<String, Object> getTenPromotionCode(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getTenPromotionCode接口-------------");
		//获取参数
		String yasId = jsonObject.getString("yasId");
		String ywOpenId = jsonObject.getString("ywOpenId");
		if (ywOpenId==null || ywOpenId.replace("\\s*", "").equals("") || yasId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject tenPromotionCode = ixuestarCloudELService.getTenPromotionCode(ywOpenId,yasId);
			//获取返回
			if (tenPromotionCode==null) {
				map = ReturnResult.otherResult(1, "未获取到相关参数的数据内容");
			}else {
				Integer code = tenPromotionCode.getInteger("code");
				if (code==0) {
					tenPromotionCode.remove("code");
					map = ReturnResult.correctResult(tenPromotionCode);					
				}else if (code==1) {
					map = ReturnResult.otherResult(2, "优惠券飞走了，下去再来吧");					
				}else {
					map = ReturnResult.otherResult(3, "不可以重复领取");
				}
			}
		}
		return map;
	}
	
	/**
	 * @method 获取优惠券列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getPromotionCodeList")
	public Map<String, Object> getPromotionCodeList(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getPromotionCodeList接口-------------");
		//获取参数
		String ywOpenId = jsonObject.getString("ywOpenId");
		Integer listType = jsonObject.getInteger("listType");
		Integer pageIndex = jsonObject.getInteger("pageIndex");
		Integer pageSize = jsonObject.getInteger("pageSize");
		if (ywOpenId==null || listType==null || pageIndex==null || pageSize==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject promotionCodeList = ixuestarCloudELService.getPromotionCodeList(ywOpenId, listType, pageIndex, pageSize);
			//获取返回
			if (promotionCodeList==null) {
				map = ReturnResult.otherResult(1, "未获取到相关参数的数据内容");
			}else {
				map = ReturnResult.correctResult(promotionCodeList);					
			}
		}
		return map;
	}
	
	
	/**
	 * @method 获取班级通知
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getClasstoinform")
	public Map<String, Object> getClasstoinform(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入getClasstoinform接口-------------");
		//获取参数
		String ixssId = jsonObject.getString("ixssId");
		String ixscId = jsonObject.getString("ixscId");
		Integer ycnType = jsonObject.getInteger("ycnType");
		Integer ycnFlag = jsonObject.getInteger("ycnFlag");
		Integer pageIndex = jsonObject.getInteger("pageIndex");
		Integer pageLimit = jsonObject.getInteger("pageLimit");
		//非空给值
		if (ycnFlag==null) ycnFlag = 0;
		
		if (ixscId==null || pageIndex==null || pageLimit==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			JSONObject classtoinform = ixuestarCloudELService.getClasstoinform(ycnFlag, ycnType, ixssId, ixscId, pageIndex, pageLimit);
			//获取返回
			if (classtoinform==null) {
				map = ReturnResult.otherResult(1, "未获取到相关参数的数据内容");
			}else {
				map = ReturnResult.correctResult(classtoinform);					
			}
		}
		return map;
	}
	
	
	/**
	 * @method 写入回复班级通知
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/writeReplytonotice")
	public Map<String, Object> writeReplytonotice(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空");
		logger.info("-----------进入writeReplytonotice接口-------------");
		//获取参数
		String ycnId = jsonObject.getString("ycnId");
		String ixssId = jsonObject.getString("ixssId");
		Integer ycnFlag = jsonObject.getInteger("ycnFlag");
		JSONArray fileIds = jsonObject.getJSONArray("fileIds");
		String yrcnContent = jsonObject.getString("yrcnContent");
		//非空判断
		if (ycnFlag==null) ycnFlag = 0;
		
		if (ycnId==null || ixssId==null || fileIds==null || yrcnContent==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核对");
		}else {
			
			JSONObject writeReplytonotice = ixuestarCloudELService.writeReplytonotice(ycnFlag, yrcnContent, ycnId, ixssId, fileIds);
			//获取返回
			Integer code = writeReplytonotice.getInteger("code");
			writeReplytonotice.remove("code");
			if (code==0) {
				map = ReturnResult.correctResult(writeReplytonotice);									
			}else if (code==1) {
				map = ReturnResult.otherResult(1, "班级通知id有误，请核对");
			}else if (code==2) {
				map = ReturnResult.otherResult(2, "学生信息id有误，请核对");
			}else if (code==3) {
				map = ReturnResult.otherResult(3, "该学生没有回复该通知的权限");
			}else if (code==4) {
				map = ReturnResult.otherResult(4, "不可以重复回复通知内容");
			}
		}
		return map;
	}
	
	/**
	 * @method 查询课程表
	 * @param request
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getstuClasschdeul")
	public Map<String, Object> getstuClasschdeul(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空！");
		//获取参数
		String ixscId = jsonObject.getString("ixscId");
		if (ixscId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核实");
		}else {
			//执行查询参数
			JSONObject classSchedule = ixuestarCloudELService.getstuClassSchedule(ixscId);
			//结果返回
			map = ReturnResult.correctResult(classSchedule);
		}
		return map;
	}
	
	/**
	 * @method 写入查看通知的学生数据
	 * @param request
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/writeChecktheNoticeInfo")
	public Map<String, Object> writeChecktheNoticeInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		Map<String, Object> map = null;
		//非空判断
		this.validateObjectNullException(jsonObject, "参数不能为空！");
		//获取参数
		String ycnId = jsonObject.getString("ycnId");
		String ixssId = jsonObject.getString("ixssId");
		Integer ycnFlag = jsonObject.getInteger("ycnFlag");
		if (ycnFlag==null) ycnFlag = 0;
		
		if (ycnId==null || ixssId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核实");
		}else {
			//执行查询参数
			JSONObject classSchedule = ixuestarCloudELService.writeChecktheNoticeInfo(ycnFlag, ycnId, ixssId);
			Integer code = classSchedule.getInteger("code");
			if (code==0) {
				classSchedule.remove("code");
				map = ReturnResult.correctResult(classSchedule);
			}else if (code==1) {
				map = ReturnResult.otherResult(1, "学生信息id有误");				
			}else if (code==2) {
				map = ReturnResult.otherResult(2, "该学生没有查看通知的权限");		
			}else if(code==3){
				map = ReturnResult.otherResult(3, "不可以重复写入查看");
			}
		}
		return map;
	}
	
	/**
	 * @method 获取广告列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getAdvertisList")
	public Map<String, Object> getAdvertisList(HttpServletRequest request,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;

		JSONObject adverList = ixuestarCloudELService.getAdverList();
		//传出
		if (adverList==null) {
			map = ReturnResult.otherResult(1, "未获取到相关参数的数据内容");
		}else {
			map = ReturnResult.correctResult(adverList);					
		}
		//返回
		return map;
	}
	
	
	/**
	 * @method 上传广告图片
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/upLoadAdverFile")
	public Map<String, Object> upLoadAdverFile(@RequestParam(value = "files")MultipartFile[] milMultipartFiles,
			@RequestParam(value = "fileNames") List<String> fileNames,@RequestParam(value = "yasId")String yasId,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		if (milMultipartFiles.length==0) return ReturnResult.otherResult(-1, "文件不能为空");
		//获取参数
		//循环上传文件
		JSONObject jsonObject = new JSONObject();
		JSONArray jsonArray = new JSONArray();
		for (int i = 0; i < milMultipartFiles.length; i++) {
			MultipartFile multipartFile = milMultipartFiles[i];
			String fileName = fileNames.get(i);
			//上传
			JSONObject upLoadAdverFile = ixuestarCloudELService.upLoadAdverFile(multipartFile, fileName, yasId);
			jsonArray.add(upLoadAdverFile);
		}
		//添加返回
		jsonObject.put("fileList", jsonArray);
		jsonObject.put("fileLength", jsonArray.size());
		//返回
		map = ReturnResult.correctResult(jsonObject);
		//返回
		return map;
	}
	
	/**
	 * @method 获取家庭作业列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getCheckHomeworkList")
	public Map<String, Object> getCheckHomeworkList(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//获取参数
		String ixssId = jsonObject.getString("ixssId");
		String ixscId = jsonObject.getString("ixscId");
		Integer ycnFlag = jsonObject.getInteger("ycnFlag");
		Integer pageIndex = jsonObject.getInteger("pageIndex");
		Integer pageLimit = jsonObject.getInteger("pageLimit");
		Integer ycnRequest = jsonObject.getInteger("ycnRequest");
		//判断非空
		if (ixssId==null || ixscId==null || ycnFlag==null || pageIndex==null || pageLimit==null || ycnRequest==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核实");
		}else {
			JSONObject checkHomeworkList = ixuestarCloudELService.getCheckHomeworkList(ycnRequest, ycnFlag, ixssId, ixscId, pageIndex, pageLimit);
			//首先获取code
			Integer code = checkHomeworkList.getInteger("code");
			checkHomeworkList.remove("code");
			if (code==0) {
				map = ReturnResult.correctResult(checkHomeworkList);
			}else if (code==1) {
				map = ReturnResult.otherResult(code, "未获取到该参数的相关数据");
			}
		}
		//返回
		return map;
	}
	
	
	/**
	 * @method 分享获取消息详情
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getCheckNoticeInfo")
	public Map<String, Object> getCheckNoticeInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//获取参数
		String ycnId = jsonObject.getString("ycnId");
		String openId = jsonObject.getString("openId");
		String ixscId = jsonObject.getString("ixscId");
		//判断非空
		if (ycnId==null || openId==null || ixscId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核实");
		}else {
			JSONObject checkNoticeInfo = ixuestarCloudELService.getCheckNoticeInfo(ycnId, ixscId, openId);
			//首先获取code
			Integer code = checkNoticeInfo.getInteger("code");
			checkNoticeInfo.remove("code");
			if (code==0) {
				map = ReturnResult.correctResult(checkNoticeInfo);
			}else if (code==1) {
				map = ReturnResult.otherResult(code, "没有该用户数据");
			}else if (code==2) {
				map = ReturnResult.otherResult(code, "该用户未进行绑定");
			}else if (code==3) {
				map = ReturnResult.otherResult(code, "该用户没有权限查看该通知");
			}
		}
		//返回
		return map;
	}
	
	
	/**
	 * @method 获取考试列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getStutestscoresList")
	public Map<String, Object> getStutestscoresList(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//获取参数
		String ixscId = jsonObject.getString("ixscId");
		Integer pageIndex = jsonObject.getInteger("pageIndex");
		Integer pageLimit = jsonObject.getInteger("pageLimit");
		//判断非空
		if (ixscId==null || pageIndex==null || pageLimit==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核实");
		}else {
			JSONObject stutestscoresList = ixuestarCloudELService.getStutestscoresList(ixscId, pageIndex, pageLimit);
			if (stutestscoresList!=null) {
				map = ReturnResult.correctResult(stutestscoresList);
			}else {
				map = ReturnResult.otherResult(1, "没有获取到相关数据");
			}
		}
		//返回
		return map;
	}
	
	/**
	 * @method 分享获取消息详情
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getStuExaminationsInfo")
	public Map<String, Object> getStuExaminationsInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//获取参数
		String ixscId = jsonObject.getString("ixscId");
		String ixssId = jsonObject.getString("ixssId");
		String yenId = jsonObject.getString("yenId");
		//判断非空
		if (ixscId==null || ixssId==null || yenId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核实");
		}else {
			JSONObject stuExaminationsInfo = ixuestarCloudELService.getStuExaminationsInfo(ixscId, ixssId, yenId);
			//首先获取code
			Integer code = stuExaminationsInfo.getInteger("code");
			if (code==0) {
				map = ReturnResult.correctResult(stuExaminationsInfo);
			}else if (code==1) {
				map = ReturnResult.otherJSONObjectResult(0, stuExaminationsInfo ,"打卡未达标准");
			}else if (code==2) {
				map = ReturnResult.otherJSONObjectResult(0, stuExaminationsInfo ,"未获取到该次考试该用户的相关数据");
			}else if (code==3) {
				map = ReturnResult.otherJSONObjectResult(0, stuExaminationsInfo ,"未获取到该次的考试信息");
			}
		}
		//返回
		return map;
	}
	
	/**
	 * @method 获取抽奖详情
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getLotteryInfo")
	public Map<String, Object> getLotteryInfo(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//获取参数
		String ixsId = jsonObject.getString("ixsId");
		String ixsgId = jsonObject.getString("ixsgId");
		//判断非空
		if (ixsId==null || ixsId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核实");
		}else {
			JSONObject lotteryInfo = ixuestarCloudELService.getLotteryInfo(ixsgId, ixsId);
			//首先获取code
			Integer code = lotteryInfo.getInteger("code");
			if (code==0) {
				map = ReturnResult.correctResult(lotteryInfo);
			}else if (code==1) {
				map = ReturnResult.otherResult(code, "未获取到该年级有抽奖活动");
			}else if (code==2) {
				map = ReturnResult.otherResult(code, "未获取到该年级的抽奖详情");
			}
		}
		//返回
		return map;
	}
	
	/**
	 * @method 获取抽奖
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getluckydraw")
	public Map<String, Object> getluckydraw(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//获取参数
		String ywId = jsonObject.getString("ywId");
		String ylId = jsonObject.getString("ylId");
		Integer ylrType = jsonObject.getInteger("ylrType");
		//判断非空
		if (ywId==null || ylId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核实");
		}else {
			if (ylrType==null) ylrType = 0;
			JSONObject luckydraw = ixuestarCloudELService.getluckydraw(ylrType, ywId, ylId);
			//首先获取code
			if (luckydraw!=null) {
				Integer code = luckydraw.getInteger("code");
				if (code==0) {
					map = ReturnResult.correctResult(luckydraw);					
				}else if (code==1) {
					map = ReturnResult.otherResult(2, "未获取到该用户的微信信息数据");
				}else if (code==2) {
					map = ReturnResult.otherResult(3, "未达到抽奖的标准");
				}
			}else {
				map = ReturnResult.otherResult(1, "未获取到该参数的数据");
			}
		}
		//返回
		return map;
	}
	
	/**
	 * @method 获取抽奖列表
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getPrizeList")
	public Map<String, Object> getPrizeList(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//获取参数
		String ywId = jsonObject.getString("ywId");
		Integer yulStatus = jsonObject.getInteger("yulStatus");
		Integer pageIndex = jsonObject.getInteger("pageIndex");
		Integer pageLimit = jsonObject.getInteger("pageLimit");
		//判断非空
		if (ywId==null || yulStatus==null || pageIndex==null || pageLimit==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核实");
		}else {
			JSONObject prizeList = ixuestarCloudELService.getPrizeList(ywId, yulStatus, pageIndex, pageLimit);
			//首先获取code
			if (prizeList!=null) {
				map = ReturnResult.correctResult(prizeList);	
			}else {
				map = ReturnResult.otherResult(1, "未获取到该参数的数据");
			}
		}
		//返回
		return map;
	}
	
	/**
	 * @method 获取本天所有抽奖的信息
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getAllPrizeList")
	public Map<String, Object> getAllPrizeList(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//获取参数
		String ixsgId = jsonObject.getString("ixsgId");
		Integer lottery = jsonObject.getInteger("lottery");
		//判断非空
		if(lottery==null) lottery = 1;
		if (ixsgId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核实");
		}else {
			JSONObject prizeList = ixuestarCloudELService.getAllPrizeList(ixsgId,lottery);
			//首先获取code
			if (prizeList!=null) {
				map = ReturnResult.correctResult(prizeList);	
			}else {
				map = ReturnResult.otherResult(1, "未获取到该参数的数据");
			}
		}
		//返回
		return map;
	}
	
	/**
	 * @method 获取本天签到状态
	 * @param jsonObject
	 * @param response
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getClockinStatus")
	public Map<String, Object> getClockinStatus(@RequestBody JSONObject jsonObject,HttpServletResponse response){
		//创建返回参数
		Map<String, Object> map = null;
		//获取参数
		String ywOpenId = jsonObject.getString("ywOpenId");
		//判断非空
		if (ywOpenId==null) {
			map = ReturnResult.otherResult(-1, "参数有误，请核实");
		}else {
			JSONObject clockin = ixuestarCloudELService.getClockinStatus(ywOpenId);
			//首先获取code
			if (clockin!=null) {
				map = ReturnResult.correctResult(clockin);	
			}else {
				map = ReturnResult.otherResult(1, "未获取到该参数的数据");
			}
		}
		//返回
		return map;
	}
}
